{{csrf_field()}}
<input type="hidden" name="form_token" value="{{ str_random(40) }}"/>
<div class="layui-form-item">
    <label for="" class="layui-form-label">标题</label>
    <div class="layui-input-block">
        <input class="layui-input" type="text" name="title" lay-verify="title" value="{{$wheelpicture->title??old('title')}}" placeholder="请输入标题">
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">轮播图</label>

    <div class="layui-input-block">
        <div class="layui-upload">
            <button type="button" class="layui-btn" id="uploadPic"><i class="layui-icon">&#xe67c;</i>图片上传</button>
            <div class="layui-upload-list" >
                <ul id="layui-upload-box" class="layui-clear">
                    @if(isset($wheelpicture->thumb))
                        <li><img src="../../../storage/{{$wheelpicture->thumb}}" /><p>上传成功</p></li>
                    @endif
                </ul>
                <input type="hidden" name="thumb" id="thumb"  lay-verify="thumb" value="{{$wheelpicture->thumb??''}}">
            </div>
        </div>
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">命中类型</label>
    <div class="layui-input-block">
        <select id="hit_type" name="hit_type" lay-verify="hit_type" lay-filter="change_hit_type">
            <option value=""  @if( ($wheelpicture->hit_type ?? old('hit_type'))=="" ) selected @endif >==请选择==</option>
            <option value="goods_detail" @if( ($wheelpicture->hit_type ?? old('hit_type')) == "goods_detail" ) selected @endif >商品详情</option>
            <option value="goods_cate" @if( ($wheelpicture->hit_type ?? old('hit_type')) == "goods_cate" ) selected @endif >商品分类</option>
            <option value="link" @if( ($wheelpicture->hit_type ?? old('hit_type')) == "link" ) selected @endif >链接</option>
            <option value="activity" @if( ($wheelpicture->hit_type ?? old('hit_type')) == "activity" ) selected @endif >活动</option>
        </select>
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">命中内容</label>
    <div class="layui-input-block">
        <input class="layui-input" type="text" id="hit_content" name="hit_content" lay-verify="hit_content" value="{{$wheelpicture->hit_content??old('hit_content')}}" placeholder="请输入命中内容" />
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">权重</label>
    <div class="layui-input-block">
        <input class="layui-input" type="number" name="weight" lay-verify="weight" value="{{$wheelpicture->weight??old('weight')}}" placeholder="请输入权重">
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">开始时间</label>
    <div class="layui-input-block">
        <input class="layui-input" type="text" name="start_time" id="start_time" lay-verify="start_time"  value="{{$wheelpicture->start_time??old('start_time')}}" placeholder="请选择开始时间">
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">结束时间</label>
    <div class="layui-input-block">
        <input class="layui-input" type="text" name="end_time" id="end_time"  lay-verify="end_time" value="{{$wheelpicture->end_time??old('end_time')}}" placeholder="请选择结束时间">
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">备注</label>
    <div class="layui-input-block">
        <input class="layui-input" type="text" name="remark"  value="{{$wheelpicture->remark??old('remark')}}" />
    </div>
</div>
<div class="layui-form-item">
    <div class="layui-input-block">
        <button type="submit" class="layui-btn" lay-submit="" lay-filter="wheelfilter" >确 认</button>
        <a href="{{route('admin.wheelpicture')}}" class="layui-btn" >返 回</a>
    </div>
</div>